<script setup lang="ts">
import CustomBox from './CustomBox.vue'
import UVA from '@/assets/bit-screen/schedule-mge/UVA.png'
import battery2 from '@/assets/bit-screen/schedule-mge/battery2.png'
import enduMile from '@/assets/bit-screen/schedule-mge/endu_mile.png'
const statusList = [
  {
    img: UVA,
    name: '无人机名称'
  },
  {
    img: battery2,
    name: '电量',
    value: '50%'
  },

  {
    img: enduMile,
    name: '续航里程',
    value: '100KM'
  }
]
</script>
<template>
  <CustomBox title="飞行状态">
    <div class="fly-status">
      <div class="fly-item">
        <div class="fly-left flex items-center">
          <img :src="statusList[0].img" alt="" />
          <span>{{ statusList[0].name + '：' }}</span>
          <span style="font-weight: 500; color: white">南钢机库1号</span>
        </div>

        <div class="btn-box">
          <div class="btn-item">舱内</div>
        </div>
      </div>
      <div class="fly-item" v-for="(item, index) in statusList.slice(1, 3)" :key="index">
        <div class="fly-left flex items-center">
          <img :src="item.img" alt="" />
          <span>{{ item.name }}：</span>
          <span style="font-weight: 500" class="value-box">{{ item.value }}</span>
        </div>
      </div>
    </div>
  </CustomBox>
</template>

<style lang="less" scoped>
* {
  padding: 0;
  margin: 0;
}
.fly-status {
  font-family: Source Han Sans CN;
  width: 100%;
  padding-top: 5px;
  .fly-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    color: #c3d7ff;
    margin-bottom: 8px;
    &:last-child {
      margin-bottom: 0;
    }
    .fly-left {
      width: 60%;
      .value-box {
        font-family: DIN Alternate;
        font-weight: bold;
        color: #32a4ef;
      }
    }
    img {
      margin-right: 10px;
      width: 23px;
      height: 23px;
    }
    .btn-box {
      width: 35%;
      display: flex;
      justify-content: space-between;
      .btn-item {
        width: 42px;
        background: linear-gradient(180deg, #0176d6, #38aaf2);
        border-radius: 4px;
        text-align: center;
        font-size: 12px;
        color: white;
      }
    }
  }
}
/* 当视口高度大于或等于880px时，应用这些样式 */
@media screen and (min-height: 950px) {
  .fly-status {
    padding: 5px 0 !important;
  }
}
@media screen and (max-width: 1880px) {
  .fly-left {
    width: 80% !important;
    // .value-box {
    //   font-family: DIN Alternate;
    //   font-weight: bold;
    //   color: #32a4ef;
    // }
  }
}
</style>
